/**
 * 
 */
package facade;

import tp.model.Client;
import tp.model.Ticket;
import tp.model.Train;
import tp.model.Trajet;
import tp.model.Ville;
import dao.interfaces.IClientDAO;
import dao.interfaces.ITicketDAO;
import dao.interfaces.ITrainDAO;
import dao.interfaces.ITrajetDAO;
import dao.interfaces.IVilleDAO;
import dao.versant.ClientDAOVersant;
import dao.versant.TicketDAOVersant;
import dao.versant.TrainDAOVersant;
import dao.versant.TrajetDAOVersant;
import dao.versant.VilleDAOVersant;



/**
 * @author Admin
 *
 */

public class FacadeInitialisation {
	
	private IClientDAO clientDao;
	private ITicketDAO ticketDao;
	private ITrainDAO trainDao;
	private ITrajetDAO trajetDao;
	private IVilleDAO villeDao;

	public FacadeInitialisation(boolean isVersant) {
			initVersant();
	}
	
	public void initVersant()
	{
		clientDao = new ClientDAOVersant();
		ticketDao = new TicketDAOVersant();
		trainDao = new TrainDAOVersant();
		trajetDao = new TrajetDAOVersant();
		villeDao = new VilleDAOVersant();
	}
	
	public void clientCreate(Client client) {
		clientDao.create(client);
	}

	public void ticketCreate(Ticket ticket) {
		ticketDao.create(ticket);
	}
	
	public void trainCreate(Train train) {
		trainDao.create(train);
	}
	
	public void trajetCreate(Trajet trajet) {
		trajetDao.create(trajet);
	}
	
	public void villeCreate(Ville ville) {
		villeDao.create(ville);
	}
}
